#include "Parking.h"
#include <fstream>

//les constructeurs:

Parking::Parking() {}

Parking::Parking(string NomParking,long NumParking, string Adresse, string NomResponsable, long CapaciteParking,long NombreDePlaceOccupe)
{
	this->NomParking=NomParking;
	this->NumParking=NumParking;
	this->Adresse=Adresse;
	this->NomResponsable=NomResponsable;
	this->CapaciteParking=CapaciteParking;
	this->NombreDePlaceOccupe=NombreDePlaceOccupe;
}

Parking::Parking(const Parking& P)
{
	Adresse=P.Adresse;
	CapaciteParking=P.CapaciteParking;
	NomParking=P.NomParking;
	NomResponsable=P.NomResponsable;
	NumParking=P.NumParking;
	NombreDePlaceOccupe=P.NombreDePlaceOccupe;
}

Parking::~Parking() {}

string Parking::getAdresse()const
{
	return this->Adresse;
}

void Parking::setAdresse(string Adresse)
{
	this->Adresse=Adresse;
}

long Parking::getCapaciteParking()const
{
	return this->CapaciteParking;
}

void Parking::setCapaciteParking(long CapaciteParking)
{
	this->CapaciteParking=CapaciteParking;
}

long Parking::getNombreDePlaceOccupe()const
{
	return this->NombreDePlaceOccupe;
}

void Parking::setNombreDePlaceOccupe(long NombreDePlaceOccupe)
{
	this->NombreDePlaceOccupe=NombreDePlaceOccupe;
}

string Parking::getNomParking() const
{
	return this->NomParking;
}

void Parking::setNomParking(string NomParking)
{
	this->NomParking=NomParking;
}

string Parking::getNomResponsable()const
{
	return this->NomResponsable;
}

void Parking::setNomResponsable(string NomResponsable)
{
	this->NomResponsable=NomResponsable;
}


long Parking::getNumParking()const
{
	return this->NumParking;
}

void Parking::setNumParking(long NumParking)
{
	this->NumParking=NumParking;
}


ifstream& operator>>(ifstream& in,Parking& P)
{
in>>P.NumParking;
in>>P.NomParking;
in>>P.CapaciteParking;
in>>P.Adresse;
in>>P.NomResponsable;
in>>P.NombreDePlaceOccupe;
return in;
}

ofstream& operator<<(ofstream& out,const Parking& P)
{
out<<P.getNumParking()<<"\t"
<<P.getNomParking()<<"\t"
<<P.getCapaciteParking()<<"\t"
<<P.getAdresse()<<"\t"
<<P.getNomResponsable()<<"\t"
<<P.getNombreDePlaceOccupe();
return out;
}


ostream& operator<<(ostream& out,const Parking& P)
{
out<<"Nom du Parking : "<<P.getNomParking()<<"\t"
<<"Num Parking : "<<P.getNumParking()<<"\t"
<<"Adresse : "<<P.getAdresse()<<"\t"
<<"Nom du Responsable : "<<P.getNomResponsable()<<"\t"
<<"Capacité Parking : "<<P.getCapaciteParking()<<"\t"
<<"Nombre de place Occupé : "<<P.getNombreDePlaceOccupe();
return out;
}






